﻿/*
 * Author: Roy Scheefhals
 * 
 * Blob object which holds the information of the blob
 * */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace LibraryCS
{
    public class Blob
    {
        //the label given by growing selection
        public int label;

        // the X and Y corner positions of the blob itself

        public Point topLeft = new Point();
        public Point topRight = new Point();
        public Point bottomLeft = new Point();
        public Point bottomRight = new Point();

        //the corner positions of the blob
        //This is the coordinates of the bounding box shown in the GUI
        public int maxx = 0, maxy = 0, minx = 0, miny = 0;

        //amount of BLOB pixels
        public int amountOfPixels = 0;

        //by martijn koopman
        public override string ToString() {
            string str = "Blob: label = " + label + "; pixels = " + amountOfPixels + "\n";
            str += "(" + topLeft.X + ", " + topLeft.Y + ") (" + topRight.X + ", " + topRight.Y + ")\n";
            str += "(" + bottomLeft.X + ", " + bottomLeft.Y + ") (" + bottomRight.X + ", " + bottomRight.Y + ")\n";

            return str;
        }
    }
}
